 var id = getvl("id");

function jubao(){
            if(id!=''|| uuuuid!=''){
            var jubaoliyou=$("#jubaoliyou").val();	
            var reportType=$(".cgs_xuanze_li").attr("name");
              var xijie="";
	    $(".classa").each(function(t,y){
	    
	    	  xijie+=$(this).val()+"***";
	    });
	     var xijietupian=xijie.substring(0,xijie.length-3);
	     
               if(jubaoliyou!=""){
               	
               
    $.ajax({
        url:  urlcore + "/api/report/add",
        type: "post",
        contentType: "application/json;charset=utf-8",
        data: JSON.stringify({
        	shopId:id,
        	userId:uuuuid,
        	reportType:reportType,
        	reportImg:xijietupian,
        	reportContent:jubaoliyou
        }),
        dataType: "json",
        success:function(data){
            if (data.success == true) {
            	alert("举报成功！");
                    window.location.href = "index.html";
            } else if (data.code == 'OVERTIME') {
                var thisUrl = window.location.href;
                if (thisUrl.indexOf('login.html') <= -1) {
                    top.window.location.href = "1.0.0denglu.html";
                }
            } else {
                alert(data.msg);
            }
        },
        error: function() {
            alert("error");
        }
    });
     	
               }else{
               	alert("请填写举报理由");
               }
           }
        
	   
	    

}
